package net.kucoe.grin.utils;

import net.kucoe.grin.internal.ConstructorSteppingCreator;

/**
 * Result creation utility.
 * 
 * @author Vitaliy Basyuk
 * @param <T> result type
 */
public class ResultFuture<T> {
    
    private final T result;
    
    /**
     * Creates result future proxy.
     * 
     * @param clazz result class
     * @param params result fields
     */
    public ResultFuture(final Class<T> clazz, final Object... params) {
        this.result = ConstructorSteppingCreator.create(clazz, params);
    }
    
    /**
     * Returns the result T.
     * 
     * @return the result T.
     */
    public T getResult() {
        return result;
    }
    
}
